#!/usr/bin/env python
# -*- coding: utf-8 -*-

from filesinker import SinkCache, SinkFiler, SinkConfigure

from jujuc import log

#log.enableDebug()

CONFIGURE = 'sinkfiler.conf'

config = SinkConfigure()
config.parse( CONFIGURE )

sinker = SinkFiler( config )
cache = SinkCache( sinker, 1024 )

DASH = '-'
def makeData( x ) :
    s = '%08d' % x
    return DASH.join([s] * 8)

for x in xrange(1000) :
    cid = x % 3 + 1
    data = makeData( x )
    cache.write( cid, data )
